package com.example.controller;

import com.example.entity.Movie;
import com.example.service.MovieService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author: 15489  <br/>
 * Date: 2022/3/23:15:13  <br/>
 * Description:
 */

@RestController
@RequestMapping("/movie")
public class MovieController {
    @Resource
    private MovieService movieService;

    @GetMapping("/findById")
    public Movie findById(int id){
        System.out.println("MovieController.findById");
        return  movieService.findById(id);
    }
    @GetMapping("/deById")
    public int deById(int id){
        return  movieService.deById(id);
    }
}
